//
//  ControllerSlashGameScene.h
//  CanYouDoIt
//
//  Created by hoangtx on 7/15/13.
//
//

#ifndef CanYouDoIt_ControllerSlashGameScene_h
#define CanYouDoIt_ControllerSlashGameScene_h

#include "CountDownGameScene.h"
#include "MyControllerButton.h"
using namespace cocos2d;
class ControllerSlashGameScene : public CountDownGameScene{
    CCArray* fileNameArray;
public:
    CCArray* buttonArray;
    CCArray* targetArray;
    CCArray* subTargetArray;
    CCArray* correctArray;
    
    void randomizeTarget(CCArray* array,double startY);
    void swapAndContinueToRandomize();
    double getTargetTop();
    double getTargetBot();
    CCRect getMainTargetRect();
    void lock();
    bool isLock;
    void tickTimeLock(float dt);
    static CCScene* scene(int numberOfSeconds);
    void setColorStateForButton(MyControllerButton* iButton,int index);
    void onTapAtButton(CCObject* sender);
    static ControllerSlashGameScene* create(int numberOfSeconds);
    void startGame();
    virtual void reset();
    virtual bool init();
    void draw();
    virtual void ccTouchesBegan(CCSet* touches, CCEvent* pEvent);
    virtual void ccTouchesMoved(CCSet* touches, CCEvent* pEvent);
    virtual void ccTouchesEnded(CCSet* touches, CCEvent* pEvent);
    CREATE_FUNC(ControllerSlashGameScene);
};

#endif
